package com.motorola.dp.jenkinsmonitor.service.util;

import java.io.File;

/**
*
* Utility functions for working with Files
*
*/
public interface FileService {

    /**
    *
    * Returns file extension or empty string if file has no extension
    *
    * @param file
    * @return extension String
    * @throws IllegalArgumentException if passed argument is not a valid file
    *
    */
    String getExtension(File file);

    /**
     *
     * Checks that file is not null, exists, is not a directory, and has the right extension
     *
     * @param file
     * @return true if the file is valid, false otherwise
     *
     */
    boolean isValidFile(File file, String extension);
}
